for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
/**
*
* The FisheReponse used in a fisherCallback
* @class FisherResponse
*/
class FisherResponse {
* Creates an instance of FisherResponse.
* @param {Fisherman} client
* @param {FisherRouter} router
constructor (client, router) {
* @private
* @type {FisherRouter}
this.router = router
* @type {Fisherman}
this.client = client
}
* Emit a "fisherCode" event
* @param {(number|FisherCode)} code The code to send
* @param {Error} [err = null] An error to pass
[err
err
* @fires Fisherman#fisherCode
* @memberof FisherResponse
sendCode (code, err = null) {
* Emitted when a fisherCode is by the router, or when something bad happenned
* @event Fisherman#fisherCode
* @param {FisherRouter} router the router
* @param {FisherCode} code the fisherman code
* @param {Error} err the error
this.client.emit('fisherCode', this.router, code, err)
* Same as channel.send()
* @see https://discord.js.org/#/docs/main/stable/class/TextChannel?scrollTo=send
* @param {string} text
* @param {Object} [data = {}]
[data
data
* @returns {Promise<Message|Message[]>}
send (text, data = {}) {
return this.router.request.channel.send(text, data)
module.exports = FisherResponse